package com.sto.stoapp.http.request;

import android.content.Context;

import com.sto.stoapp.db.StoFilePreference;
import com.sto.stoapp.md5.Md5;
import com.sto.stoapp.util.DateUtil;
import com.sto.stoapp.util.Helper;

/**
 * 登录请求实体�?
 * 
 * @author cjb
 * 
 */
public class LoginRequest extends BaseRequest {

	public LoginRequest(Context c, String empCode, String passWord, String trace) {
		this.empCode = StoFilePreference.getInstance(c).getSiteCode() + empCode;
		this.pdaPassword = Md5.getMD5Hex(passWord);
		deviceType = "PDA";
		this.trace = trace;
		opOrgCode = StoFilePreference.getInstance(c).getSiteCode();
		opTerminal = StoFilePreference.getInstance(c).getMachineCode();
		tid = StoFilePreference.getInstance(c).getMachineCode();
		verifyDate = DateUtil.getDateTime();
		mty = "0851";
		sessionId = StoFilePreference.getInstance(c).getSessionId();
		int connectT = Helper.getConnectedType(c);
		if (connectT == 0) {
			connectionType = "1";
		} else {
			connectionType = "0";
		}
		os = "android";
		pdaType = Helper.getPDAType();
		osVersion = Helper.getAndroidOsVersion();

		softVersion = Helper.getVersionName(c);

	}

	/**
	 * 操作网点编码
	 */
	public String opOrgCode;

	/**
	 * 设备类型
	 */
	public String deviceType = "";
	/**
	 * 操作终端
	 */
	public String opTerminal = "";

	/**
	 * 员工工号
	 */
	public String empCode = "";

	/**
	 * 密码
	 */
	public String pdaPassword = "";
	/**
	 * 登录日期
	 */
	public String verifyDate = "";
	/**
	 * 登录连接方式 0：WiFi 1：GPRS 2：WLAN
	 */
	public String connectionType = "";
	/**
	 * 操作系统
	 */
	public String os = "";
	/**
	 * 系统版本
	 */
	public String osVersion = "";
	/**
	 * 软件版本
	 */
	public String softVersion = "";
	public String pdaType = "";

}
